<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center activityLists_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub activityLists_fd0_0'>
					<view class='flex flex-wrap align-center activityLists_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  activityLists_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='activityLists_fd0_0_c1'>热门服务列表</text>
					<view class='flex flex-wrap align-center activityLists_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---服务列表flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout activityLists_flex_1">
				<template v-for='(item,key0) in popularList'>
					<view class='flex flex-direction flex-wrap align-stretch activityLists_fd1_0'
						@tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/index/serviceDetails/serviceDetails?id=${item.aid}&serviceName=${item.service_title}`"
						:key='key0'>
						<view class='flex flex-wrap align-center'>
							<image class='activityLists_fd1_0_c0_c0' mode="aspectFill" :src='item.picture'></image>
						</view>
						<view class='flex flex-wrap align-center activityLists_fd1_0_c1'>
							<text class='flex-sub activityLists_fd1_0_c1_c0'>{{item.service_title}}</text>
						</view>
						<view class='flex flex-wrap align-center index_fd7_1_c2' @tap.stop="handleJumpDiy"
							data-type="navigateTo"
							:data-url="`/pages/index/shopList/shopList?aid=${item.usermerchant_id}`"
							v-if=" item.usermerchant_id>0">
							<text class='index_fd7_1_c2_c0'>{{item.store_name}}</text>
							<text class='index_fd7_1_c2_c1'>进店</text>
							<text class='fu-iconfont2  index_fd7_1_c2_c2'>&#xe7f2;</text>
						</view>
						<view class='flex flex-wrap align-center activityLists_fd1_0_c2'>
							<view class='flex flex-wrap align-end'>
								<text class='activityLists_fd1_0_c2_c0_c0'>￥</text>
								<text class=' activityLists_fd1_0_c2_c0_c1'>
									<text>{{ item.deposit_money | frontPrice }}</text>
									<text>{{ item.deposit_money | laterPrice }}</text>
								</text>
								<text class='activityLists_fd1_0_c2_c0_c2'>{{item.unit_name}}</text>
							</view>
							<text class='activityLists_fd1_0_c2_c1'>￥</text>
							<text class='activityLists_fd1_0_c2_c2'>{{item.scribe_money}}</text>
							<button class='activityLists_fd1_0_c2_c3' @tap.stop="handleJumpDiy" data-type="navigateTo"
								:data-url="`/pages/index/serviceDetails/serviceDetails?id=${item.aid}&serviceName=${item.service_title}`">立即抢购</button>
						</view>
						<view class='flex flex-wrap align-center activityLists_fd1_0_c3'>
							<text class='activityLists_fd1_0_c3_c0'>{{item.server_type_name}}</text>
						</view>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---服务列表flex布局结束-->


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"popularList": [],
				"cityinfo": {
					"text": "",
					"lat": "",
					"lng": ""
				},
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getServiceFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getServiceFunc()
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取活动列表信息
			getServiceFunc() {
				this.cityinfo = uni.getStorageSync('cityinfo')
				this.minixPagingListsApi = global.apiUrls.post64e01fe930bcf;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					is_index: '2',
					city_name: this.cityinfo.text
				}
				this.listData = [];
				this.popularList = this.listData;
				this.pagingListToggle();

			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(248, 248, 248, 1);
		background-size: 100% auto;
	}

	.activityLists_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.activityLists_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.activityLists_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
	}

	.activityLists_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.activityLists_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.activityLists_flex_1 {
		padding: 24rpx 24rpx 0rpx 24rpx;
	}

	.activityLists_fd1_0_c3_c0 {
		font-size: 28rpx;
		font-weight: 400;
		color: var(--benbenFontColor3);
	}

	.activityLists_fd1_0_c3 {
		background: var(--benbenbgColor2);
		padding: 10rpx 20rpx 10rpx 20rpx;
		border-radius: 16rpx 0rpx 16rpx 0rpx;
		background-size: 100% auto;
		position: absolute;
	}

	.activityLists_fd1_0_c2_c3 {
		background: var(--benbenbgColor2);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 24rpx;
		color: #fff;
		width: 156rpx;
		height: 48rpx;
		line-height: 48rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.activityLists_fd1_0_c2_c2 {
		text-decoration: line-through;
		font-size: 24rpx;
		font-weight: 400;
		color: rgba(153, 153, 153, 1);
	}

	.activityLists_fd1_0_c2_c1 {
		text-decoration: line-through;
		font-size: 24rpx;
		font-weight: 400;
		color: rgba(153, 153, 153, 1);
		margin: 0rpx 0rpx 0rpx 10rpx;
	}

	.activityLists_fd1_0_c2_c0_c2 {
		color: #FF5050;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 51rpx;
		margin: 0rpx 0rpx 0rpx 16rpx;
	}

	.activityLists_fd1_0_c2_c0_c1 {
		line-height: 50rpx;
		font-size: 36rpx;
		font-weight: 600;
		color: rgba(255, 80, 80, 1);
	}

	.activityLists_fd1_0_c2_c0_c0 {
		color: rgba(255, 80, 80, 1);
		font-size: 24rpx;
		font-weight: 600;
		line-height: 45rpx;
	}

	.activityLists_fd1_0_c2 {
		margin: 0rpx 24rpx 24rpx 24rpx;
	}

	.activityLists_fd1_0_c1_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.activityLists_fd1_0_c1 {
		margin: 24rpx 24rpx 9rpx 24rpx;
	}

	.activityLists_fd1_0_c0_c0 {
		width: 702rpx;
		height: 360rpx;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
	}

	.activityLists_fd1_0 {
		background: #fff;
		margin: 0rpx 0rpx 20rpx 0rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		position: relative;
	}

	//店铺信息样式
	.index_fd7_1_c2_c2 {
		font-size: 16rpx;
		color: rgba(191, 191, 191, 1);
		margin: 3rpx 0rpx 0rpx 10rpx;
	}

	.index_fd7_1_c2_c1 {
		font-size: 24rpx;
		font-weight: 400;
		color: rgba(191, 191, 191, 1);
		margin: 0rpx 0rpx 0rpx 20rpx;
	}

	.index_fd7_1_c2_c0 {
		font-size: 24rpx;
		font-weight: 400;
		color: rgba(191, 191, 191, 1);
	}

	.index_fd7_1_c2 {
		margin: 0rpx 24rpx 10rpx 24rpx;
	}
</style>